@{this.layout = './shared/layoutAdmin'}

<link href="/libs/fuelux/dist/css/fuelux.min.css" rel="stylesheet"/>
<link href="/libs/sweetalert/dist/sweetalert.css" rel="stylesheet"/>
<link href="/libs/form.validation/dist/css/formValidation.min.css" rel="stylesheet"/>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-8">
        <h2>@__("admin.newarticle.new")</h2>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-content">
                    <form id="postForm" action="/admin/saveArticle" method="post">
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label for="Title">@__("admin.newarticle.title")</label>
                                    <input id="Title" type="text" name="Title" placeholder='@__("admin.newarticle.enter_title")' class="form-control"/>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label for="CategoryId" style="display:block;">@__("admin.newarticle.category")</label>
                                    <div id="Categorylist" data-resize="auto" data-initialize="selectlist" class="btn-group selectlist">
                                        <button data-toggle="dropdown" type="button" class="btn btn-white dropdown-toggle"><span class="selected-label"></span><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
                                        <ul role="menu" class="dropdown-menu"></ul>
                                        <input id="CategoryId" type="text" name="CategoryId" readonly="readonly" aria-hidden="true" class="hidden hidden-field"/>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label for="Alias">Alias</label>
                                    <input id="Alias" type="text" name="Alias" placeholder='@__("admin.newarticle.enter_alias")' class="form-control"/>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <button type="button" class="btn btn-sm btn-white btn-alias">
                                        <i class="fa fa-flash"></i> @__("admin.newarticle.auto_generate")
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="Summary">@__("admin.newarticle.summary")</label>
                            <textarea id="Summary" name="Summary" style="min-width: 100%;max-width: 100%;" placeholder='@__("admin.newarticle.enter_summary")' class="form-control"></textarea>
                        </div>
                        <div class="form-group">
                            <label style="display:block;">@__("admin.newarticle.source")</label>
                            <label id="soruceLocal" data-initialize="radio" class="radio-custom radio-inline">
                                <input data-toggle="#block-local" name="Source" type="radio" value="0" checked="checked" class="sr-only"/> @__("admin.newarticle.local")
                            </label>
                            <label id="soruceLink" data-initialize="radio" class="radio-custom radio-inline">
                                <input data-toggle="#block-link" name="Source" type="radio" value="1" class="sr-only"/> @__("admin.newarticle.url")
                            </label>
                        </div>
                        <div id="block-local">
                            <div class="form-group">
                                <label for="pillbox-input">@__("admin.newarticle.tag")</label>
                                <div id="myPillbox" data-initialize="pillbox" class="pillbox">
                                    <ul class="clearfix pill-group">
                                        <li class="pillbox-input-wrap btn-group"><a class="pillbox-more">and<span class="pillbox-more-count"></span> more...</a>
                                            <input id="pillbox-input" type="text" placeholder='@__("admin.newarticle.enter_to_add")' class="form-control dropdown-toggle pillbox-add-item"/>
                                            <button type="button" class="dropdown-toggle sr-only"><span class="caret"></span><span class="sr-only">Toggle Dropdown</span></button>
                                            <ul role="menu" data-toggle="dropdown" data-flip="auto" class="suggest dropdown-menu"></ul>
                                        </li>
                                    </ul>
                                </div>
                                <input id="Labels" type="hidden" name="Labels"/>
                            </div>
                            <div class="form-group">
                                <label>@__("admin.newarticle.article")</label>
                                <script id="editor" type="text/plain"></script>
                            </div>
                        </div>
                        <div id="block-link">
                            <div class="form-group">
                                <label for="Url">Url</label>
                                <input id="Url" type="text" name="Url" placeholder='@__("admin.newarticle.enter_url")' class="form-control"/>
                            </div>
                        </div>
                        <div>
                            <button id="btnPublish" type="submit" class="btn btn-danger">
                                <i class="fa fa-send"></i> @__("admin.newarticle.publish")
                            </button>
                            <button id="btnSave" type="button" class="btn btn-primary">
                                <i class="fa fa-save"></i> @__("admin.newarticle.save_draft")
                            </button>
                            <input id="UniqueId" type="hidden" name="UniqueId" value="@uniqueId"/>
                            <input id="IsDraft" type="hidden" name="IsDraft"/>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="/libs/jquery/dist/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/bootstrap/dist/js/bootstrap.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/form.validation/dist/js/formValidation.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/form.validation/dist/js/framework/bootstrap.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/form.validation/dist/js/language/zh_CN.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/metisMenu/dist/metisMenu.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/javascripts/admin.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/ueditor/ueditor.config.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/ueditor/ueditor.all.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/ueditor/dialogs/insertalert/insertalert.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/ueditor/dialogs/inserticon/inserticon.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/ueditor/dialogs/insertlabel/insertlabel.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/fuelux/dist/js/fuelux.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/sweetalert/dist/sweetalert.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/libs/js-md5/js/md5.min.js" charset="utf-8"></script>
<script>var translateKey = '@config.TranslateKey';</script>
<script type="text/javascript" src="/javascripts/newarticle.js" charset="utf-8"></script>